package com.fx.attendance.service;

import com.alibaba.fastjson.JSONObject;
import com.fx.attendance.domain.FaceInformation;
import com.fx.attendance.dto.FaceInformationQueryCriteria;
import com.fx.attendance.exception.ApiException;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;


/**
 *
 * @version: 1.0
 * @author: lijie
 * @date 2020-04-18
 */
public interface FaceInformationService{

    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Map<String,Object> queryAll(FaceInformationQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<FaceInformationDto>
     */
    List<FaceInformation> queryAll(FaceInformationQueryCriteria criteria);

    /**
     * 导出数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException
     */
    void download(List<FaceInformation> all, HttpServletResponse response) throws IOException;

    /**
     * 创建
     * @param resources /
     * @return FaceInformationDto
     */
    FaceInformation create(FaceInformation resources);

    /**
     * 编辑
     * @param resources /
     */
    void update(FaceInformation resources);

    /**
     * 多选删除
     * @param ids /
     */
    void deleteAll(Long[] ids);

    JSONObject checkFace(MultipartFile file, String compareId) throws  Exception;

    JSONObject serachFace(MultipartFile file) throws Exception;


    JSONObject checkFace(String base64Img, String attendanceId) throws ApiException;

    List<Map<String,Object>> getALlFaces() throws Exception;

    void addFace(Map<String, Object> param) throws Exception;




}
